Optimal. Leaf size=261 \[ \frac {(163 A-283 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(475 A-787 B) \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{240 a^3 d}-\frac {(85 A-157 B) \sin (c+d x) \cos ^2(c+d x)}{80 a^2 d \sqrt {a \cos (c+d x)+a}}-\frac {(985 A-1729 B) \sin (c+d x)}{120 a^2 d \sqrt {a \cos (c+d x)+a}}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{4 d (a \cos (c+d x)+a)^{5/2}}+\frac {(13 A-21 B) \sin (c+d x) \cos ^3(c+d x)}{16 a d (a \cos (c+d x)+a)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.80, antiderivative size = 261, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {2977, 2983, 2968, 3023, 2751, 2649, 206} \[ -\frac {(85 A-157 B) \sin (c+d x) \cos ^2(c+d x)}{80 a^2 d \sqrt {a \cos (c+d x)+a}}+\frac {(475 A-787 B) \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{240 a^3 d}-\frac {(985 A-1729 B) \sin (c+d x)}{120 a^2 d \sqrt {a \cos (c+d x)+a}}+\frac {(163 A-283 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{4 d (a \cos (c+d x)+a)^{5/2}}+\frac {(13 A-21 B) \sin (c+d x) \cos ^3(c+d x)}{16 a d (a \cos (c+d x)+a)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2649
Rule 2751
Rule 2968
Rule 2977
Rule 2983
Rule 3023
Rubi steps
\begin {align*} \int \frac {\cos ^4(c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^{5/2}} \, dx &=\frac {(A-B) \cos ^4(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}+\frac {\int \frac {\cos ^3(c+d x) \left (4 a (A-B)-\frac {1}{2} a (5 A-13 B) \cos (c+d x)\right )}{(a+a \cos (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=\frac {(A-B) \cos ^4(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}+\frac {(13 A-21 B) \cos ^3(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}+\frac {\int \frac {\cos ^2(c+d x) \left (\frac {3}{2} a^2 (13 A-21 B)-\frac {1}{4} a^2 (85 A-157 B) \cos (c+d x)\right )}{\sqrt {a+a \cos (c+d x)}} \, dx}{8 a^4}\\ &=\frac {(A-B) \cos ^4(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}+\frac {(13 A-21 B) \cos ^3(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {(85 A-157 B) \cos ^2(c+d x) \sin (c+d x)}{80 a^2 d \sqrt {a+a \cos (c+d x)}}+\frac {\int \frac {\cos (c+d x) \left (-\frac {1}{2} a^3 (85 A-157 B)+\frac {1}{8} a^3 (475 A-787 B) \cos (c+d x)\right )}{\sqrt {a+a \cos (c+d x)}} \, dx}{20 a^5}\\ &=\frac {(A-B) \cos ^4(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}+\frac {(13 A-21 B) \cos ^3(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {(85 A-157 B) \cos ^2(c+d x) \sin (c+d x)}{80 a^2 d \sqrt {a+a \cos (c+d x)}}+\frac {\int \frac {-\frac {1}{2} a^3 (85 A-157 B) \cos (c+d x)+\frac {1}{8} a^3 (475 A-787 B) \cos ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{20 a^5}\\ &=\frac {(A-B) \cos ^4(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}+\frac {(13 A-21 B) \cos ^3(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {(85 A-157 B) \cos ^2(c+d x) \sin (c+d x)}{80 a^2 d \sqrt {a+a \cos (c+d x)}}+\frac {(475 A-787 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{240 a^3 d}+\frac {\int \frac {\frac {1}{16} a^4 (475 A-787 B)-\frac {1}{8} a^4 (985 A-1729 B) \cos (c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{30 a^6}\\ &=\frac {(A-B) \cos ^4(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}+\frac {(13 A-21 B) \cos ^3(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {(985 A-1729 B) \sin (c+d x)}{120 a^2 d \sqrt {a+a \cos (c+d x)}}-\frac {(85 A-157 B) \cos ^2(c+d x) \sin (c+d x)}{80 a^2 d \sqrt {a+a \cos (c+d x)}}+\frac {(475 A-787 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{240 a^3 d}+\frac {(163 A-283 B) \int \frac {1}{\sqrt {a+a \cos (c+d x)}} \, dx}{32 a^2}\\ &=\frac {(A-B) \cos ^4(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}+\frac {(13 A-21 B) \cos ^3(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {(985 A-1729 B) \sin (c+d x)}{120 a^2 d \sqrt {a+a \cos (c+d x)}}-\frac {(85 A-157 B) \cos ^2(c+d x) \sin (c+d x)}{80 a^2 d \sqrt {a+a \cos (c+d x)}}+\frac {(475 A-787 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{240 a^3 d}-\frac {(163 A-283 B) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{16 a^2 d}\\ &=\frac {(163 A-283 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(A-B) \cos ^4(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}+\frac {(13 A-21 B) \cos ^3(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {(985 A-1729 B) \sin (c+d x)}{120 a^2 d \sqrt {a+a \cos (c+d x)}}-\frac {(85 A-157 B) \cos ^2(c+d x) \sin (c+d x)}{80 a^2 d \sqrt {a+a \cos (c+d x)}}+\frac {(475 A-787 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{240 a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.64, size = 139, normalized size = 0.53 \[ \frac {\tan \left (\frac {1}{2} (c+d x)\right ) (-5 (479 A-887 B) \cos (c+d x)+(832 B-400 A) \cos (2 (c+d x))+40 A \cos (3 (c+d x))-1895 A-40 B \cos (3 (c+d x))+12 B \cos (4 (c+d x))+3491 B)+30 (163 A-283 B) \cos ^3\left (\frac {1}{2} (c+d x)\right ) \tanh ^{-1}\left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{240 a d (a (\cos (c+d x)+1))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.80, size = 270, normalized size = 1.03 \[ -\frac {15 \, \sqrt {2} {\left ({\left (163 \, A - 283 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (163 \, A - 283 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (163 \, A - 283 \, B\right )} \cos \left (d x + c\right ) + 163 \, A - 283 \, B\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} + 2 \, \sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 4 \, {\left (96 \, B \cos \left (d x + c\right )^{4} + 160 \, {\left (A - B\right )} \cos \left (d x + c\right )^{3} - 32 \, {\left (25 \, A - 49 \, B\right )} \cos \left (d x + c\right )^{2} - 5 \, {\left (503 \, A - 911 \, B\right )} \cos \left (d x + c\right ) - 1495 \, A + 2671 \, B\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{960 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.69, size = 257, normalized size = 0.98 \[ -\frac {\frac {15 \, {\left (163 \, \sqrt {2} A - 283 \, \sqrt {2} B\right )} \log \left ({\left | -\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{a^{\frac {5}{2}}} - \frac {{\left ({\left ({\left (15 \, {\left (\frac {2 \, {\left (\sqrt {2} A a^{2} - \sqrt {2} B a^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{a^{2}} - \frac {21 \, \sqrt {2} A a^{2} - 29 \, \sqrt {2} B a^{2}}{a^{2}}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \frac {3685 \, \sqrt {2} A a^{2} - 6733 \, \sqrt {2} B a^{2}}{a^{2}}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \frac {5 \, {\left (1133 \, \sqrt {2} A a^{2} - 1973 \, \sqrt {2} B a^{2}\right )}}{a^{2}}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \frac {15 \, {\left (155 \, \sqrt {2} A a^{2} - 291 \, \sqrt {2} B a^{2}\right )}}{a^{2}}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a\right )}^{\frac {5}{2}}}}{480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.82, size = 467, normalized size = 1.79 \[ \frac {\sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (768 B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\cos ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+640 A \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\cos ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2176 B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\cos ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2445 A \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) \sqrt {2}\, \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -4245 B \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) \sqrt {2}\, \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -2560 A \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+5248 B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-435 A \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+555 B \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+30 A \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-30 B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{480 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a^{\frac {7}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^4\,\left (A+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{5/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________